package main

// 求 n 的阶乘
func factorial01(n int) int {
	switch {
	case n < 1:
		panic("error")
	case n == 1:
		return 1
	}

	return factorial01(n-1) * n
}
